package com.suyang.syt.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.suyang.syt.dao.interfaces.SystemNavigationDao;
import com.suyang.syt.model.SystemNavigation;
import com.suyang.syt.util.EmptyUtil;

@Repository
public class SystemNavigationDaoImpl extends BaseDaoImpl<SystemNavigation> implements SystemNavigationDao {

	@Override
	public boolean theExistenceName(String text) {
		String hql = " from SystemNavigation s where s.text=? ";
		List<SystemNavigation> list = this.list(hql, text);
		if (EmptyUtil.isNotEmpty(list)) {
			return true;
		}
		return false;
	}

	@Override
	public List<SystemNavigation> loadByText(String text) {
		String hql = " from SystemNavigation s where s.text=? ";
		return this.list(hql, text);
	}
}